

const imageRatio = [
  {
    width: 3,
    height: 4,
    imageRatio: 3 / 4,
  },
  {
    width: 4,
    height: 3,
    imageRatio: 4 / 3,
  },
  {
    width: 1,
    height: 1,
    imageRatio: 1 / 1,
  },
]

const imageList = [
    'https://res.wx.qq.com/op_res/BqgN85sXxTbk1kynEEihr_TJOaxvM0jTWnZCPVx5tYhqZIIAWcwZ-wjkthDNgUPon6gB8cS1-4Gmj9Fa0emByQ',]



export const generateGridList = (childCount, columns) => {
  var ans = []
  for (let i = 0; i < childCount; i++) {
    var ratioIdx = Math.floor(Math.random() * imageRatio.length)
    var ratio = imageRatio[ratioIdx]
    ans.push({
      id: i,
      src: imageList[0],
      ...ratio,
      like: Math.floor(Math.random() * 10000),
      content: ' ',
      nickname: ' ',
    })
  }
  return ans
}
